home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / tools / gcc / gcc270_src.lha / gcc-2.7.0-amiga / gcc.info-2 < prev    next >
Encoding:
GNU Info File  |  1995-06-16  |  37.5 KB  |  891 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  7. Boston, MA 02111-1307 USA
  8.  
  9.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995 Free Software
  10. Foundation, Inc.
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, provided also
  18. that the sections entitled "GNU General Public License," "Funding for
  19. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  20. included exactly as in the original, and provided that the entire
  21. resulting derived work is distributed under the terms of a permission
  22. notice identical to this one.
  23.  
  24.    Permission is granted to copy and distribute translations of this
  25. manual into another language, under the above conditions for modified
  26. versions, except that the sections entitled "GNU General Public
  27. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  28. `Look And Feel'", and this permission notice, may be included in
  29. translations approved by the Free Software Foundation instead of in the
  30. original English.
  31.  
  32. 
  33. File: gcc.info,  Node: Option Summary,  Next: Overall Options,  Up: Invoking GCC
  34.  
  35. Option Summary
  36. ==============
  37.  
  38.    Here is a summary of all the options, grouped by type.  Explanations
  39. are in the following sections.
  40.  
  41. *Overall Options*
  42.      *Note Options Controlling the Kind of Output: Overall Options.
  43.           -c  -S  -E  -o FILE  -pipe  -v  -x LANGUAGE
  44.  
  45. *C Language Options*
  46.      *Note Options Controlling C Dialect: C Dialect Options.
  47.           -ansi  -fallow-single-precision -fcond-mismatch  -fno-asm
  48.           -fno-builtin  -fsigned-bitfields  -fsigned-char
  49.           -funsigned-bitfields  -funsigned-char  -fwritable-strings
  50.           -traditional  -traditional-cpp  -trigraphs
  51.  
  52. *C++ Language Options*
  53.      *Note Options Controlling C++ Dialect: C++ Dialect Options.
  54.           -fall-virtual  -fdollars-in-identifiers  -felide-constructors
  55.           -fenum-int-equiv -fexternal-templates  -fhandle-signatures
  56.           -fmemoize-lookups  -fno-default-inline -fno-gnu-keywords
  57.           -fnonnull-objects  -foperator-names  -fstrict-prototype
  58.           -fthis-is-variable -nostdinc++ -traditional  +eN
  59.  
  60. *Warning Options*
  61.      *Note Options to Request or Suppress Warnings: Warning Options.
  62.           -fsyntax-only  -pedantic  -pedantic-errors
  63.           -w  -W  -Wall  -Waggregate-return  -Wbad-function-cast
  64.           -Wcast-align -Wcast-qual  -Wchar-subscript  -Wcomment
  65.           -Wconversion -Wenum-clash  -Werror  -Wformat
  66.           -Wid-clash-LEN  -Wimplicit  -Wimport  -Winline
  67.           -Wlarger-than-LEN  -Wmissing-declarations
  68.           -Wmissing-prototypes  -Wnested-externs
  69.           -Wno-import  -Woverloaded-virtual -Wparentheses
  70.           -Wpointer-arith  -Wredundant-decls -Wreorder -Wreturn-type -Wshadow
  71.           -Wstrict-prototypes  -Wswitch  -Wsynth  -Wtemplate-debugging
  72.           -Wtraditional  -Wtrigraphs -Wuninitialized  -Wunused
  73.           -Wwrite-strings
  74.  
  75. *Debugging Options*
  76.      *Note Options for Debugging Your Program or GCC: Debugging Options.
  77.           -a  -dLETTERS  -fpretend-float
  78.           -g  -gLEVEL -gcoff  -gdwarf  -gdwarf+
  79.           -ggdb  -gstabs  -gstabs+  -gxcoff  -gxcoff+
  80.           -p  -pg  -print-file-name=LIBRARY  -print-libgcc-file-name
  81.           -print-prog-name=PROGRAM  -print-search-dirs  -save-temps
  82.  
  83. *Optimization Options*
  84.      *Note Options that Control Optimization: Optimize Options.
  85.           -fcaller-saves  -fcse-follow-jumps  -fcse-skip-blocks
  86.           -fdelayed-branch   -fexpensive-optimizations
  87.           -ffast-math  -ffloat-store  -fforce-addr  -fforce-mem
  88.           -finline-functions  -fkeep-inline-functions
  89.           -fno-default-inline  -fno-defer-pop  -fno-function-cse
  90.           -fno-inline  -fno-peephole  -fomit-frame-pointer
  91.           -frerun-cse-after-loop  -fschedule-insns
  92.           -fschedule-insns2  -fstrength-reduce  -fthread-jumps
  93.           -funroll-all-loops  -funroll-loops
  94.           -O  -O0  -O1  -O2  -O3
  95.  
  96. *Preprocessor Options*
  97.      *Note Options Controlling the Preprocessor: Preprocessor Options.
  98.           -AQUESTION(ANSWER)  -C  -dD  -dM  -dN
  99.           -DMACRO[=DEFN]  -E  -H
  100.           -idirafter DIR
  101.           -include FILE  -imacros FILE
  102.           -iprefix FILE  -iwithprefix DIR
  103.           -iwithprefixbefore DIR  -isystem DIR
  104.           -M  -MD  -MM  -MMD  -MG  -nostdinc  -P  -trigraphs
  105.           -undef  -UMACRO  -Wp,OPTION
  106.  
  107. *Assembler Option*
  108.      *Note Passing Options to the Assembler: Assembler Options.
  109.           -Wa,OPTION
  110.  
  111. *Linker Options*
  112.      *Note Options for Linking: Link Options.
  113.           OBJECT-FILE-NAME  -lLIBRARY
  114.           -nostartfiles  -nodefaultlibs  -nostdlib
  115.           -s  -static  -shared  -symbolic
  116.           -Wl,OPTION  -Xlinker OPTION
  117.           -u SYMBOL
  118.  
  119. *Directory Options*
  120.      *Note Options for Directory Search: Directory Options.
  121.           -BPREFIX  -IDIR  -I-  -LDIR
  122.  
  123. *Target Options*
  124.      *Note Target Options::.
  125.           -b MACHINE  -V VERSION
  126.  
  127. *Machine Dependent Options*
  128.      *Note Hardware Models and Configurations: Submodel Options.
  129.           *M680x0 Options*
  130.           -m68000  -m68020  -m68020-40  -m68030  -m68040  -m68881
  131.           -mbitfield  -mc68000  -mc68020  -mfpa  -mnobitfield
  132.           -mrtd  -mshort  -msoft-float
  133.           
  134.           *VAX Options*
  135.           -mg  -mgnu  -munix
  136.           
  137.           *SPARC Options*
  138.           -mapp-regs  -mcypress  -mepilogue  -mflat  -mfpu  -mhard-float
  139.           -mhard-quad-float  -mno-app-regs  -mno-flat  -mno-fpu
  140.           -mno-epilogue  -mno-unaligned-doubles
  141.           -msoft-float  -msoft-quad-float
  142.           -msparclite  -msupersparc  -munaligned-doubles  -mv8
  143.           
  144.           SPARC V9 compilers support the following options
  145.           in addition to the above:
  146.           
  147.           -mmedlow  -mmedany
  148.           -mint32  -mint64  -mlong32  -mlong64
  149.           -mno-stack-bias  -mstack-bias
  150.           
  151.           *Convex Options*
  152.           -mc1  -mc2  -mc32  -mc34  -mc38
  153.           -margcount  -mnoargcount
  154.           -mlong32  -mlong64
  155.           -mvolatile-cache  -mvolatile-nocache
  156.           
  157.           *AMD29K Options*
  158.           -m29000  -m29050  -mbw  -mnbw  -mdw  -mndw
  159.           -mlarge  -mnormal  -msmall
  160.           -mkernel-registers  -mno-reuse-arg-regs
  161.           -mno-stack-check  -mno-storem-bug
  162.           -mreuse-arg-regs  -msoft-float  -mstack-check
  163.           -mstorem-bug  -muser-registers
  164.           
  165.           *ARM Options*
  166.           -mapcs -m2 -m3 -m6 -mbsd -mxopen -mno-symrename
  167.           
  168.           *M88K Options*
  169.           -m88000  -m88100  -m88110  -mbig-pic
  170.           -mcheck-zero-division  -mhandle-large-shift
  171.           -midentify-revision  -mno-check-zero-division
  172.           -mno-ocs-debug-info  -mno-ocs-frame-position
  173.           -mno-optimize-arg-area  -mno-serialize-volatile
  174.           -mno-underscores  -mocs-debug-info
  175.           -mocs-frame-position  -moptimize-arg-area
  176.           -mserialize-volatile  -mshort-data-NUM  -msvr3
  177.           -msvr4  -mtrap-large-shift  -muse-div-instruction
  178.           -mversion-03.00  -mwarn-passed-structs
  179.           
  180.           *RS/6000 and PowerPC Options*
  181.           -mcpu=CPU  TYPE
  182.           -mpower  -mno-power  -mpower2  -mno-power2
  183.           -mpowerpc  -mno-powerpc
  184.           -mpowerpc-gpopt  -mno-powerpc-gpopt
  185.           -mpowerpc-gfxopt  -mno-powerpc-gfxopt
  186.           -mnew-mnemonics  -mno-new-mnemonics
  187.           -mfull-toc   -mminimal-toc  -mno-fop-in-toc  -mno-sum-in-toc
  188.           -msoft-float  -mhard-float -mmultiple -mno-multiple
  189.           -mstring -mno-string -mbit-align -mno-bit-align
  190.           -mstrict-align -mno-strict-align -mrelocatable -mno-relocatable
  191.           -mtoc -mno-toc -mtraceback -mno-traceback
  192.           -mlittle -mlittle-endian -mbig -mbig-endian
  193.           
  194.           *RT Options*
  195.           -mcall-lib-mul  -mfp-arg-in-fpregs  -mfp-arg-in-gregs
  196.           -mfull-fp-blocks  -mhc-struct-return  -min-line-mul
  197.           -mminimum-fp-blocks  -mnohc-struct-return
  198.           
  199.           *MIPS Options*
  200.           -mabicalls  -mcpu=CPU  TYPE  -membedded-data
  201.           -membedded-pic  -mfp32  -mfp64  -mgas  -mgp32  -mgp64
  202.           -mgpopt  -mhalf-pic  -mhard-float  -mint64 -mips1
  203.           -mips2 -mips3  -mlong64  -mlong-calls  -mmemcpy
  204.           -mmips-as  -mmips-tfile  -mno-abicalls
  205.           -mno-embedded-data  -mno-embedded-pic
  206.           -mno-gpopt  -mno-long-calls
  207.           -mno-memcpy  -mno-mips-tfile  -mno-rnames  -mno-stats
  208.           -mrnames -msoft-float
  209.           -m4650 -msingle-float -mmad
  210.           -mstats  -EL  -EB  -G NUM  -nocpp
  211.           
  212.           *i386 Options*
  213.           -m486  -m386 -mieee-fp  -mno-fancy-math-387
  214.           -mno-fp-ret-in-387  -msoft-float  -msvr3-shlib
  215.           -mno-wide-multiply -mrtd -malign-double
  216.           -mreg-alloc=LIST -mregparm=NUM
  217.           -malign-jumps=NUM -malign-loops=NUM
  218.           -malign-functions=NUM
  219.           
  220.           *HPPA Options*
  221.           -mdisable-fpregs  -mdisable-indexing  -mfast-indirect-calls
  222.           -mgas  -mjump-in-delay -mlong-millicode-calls -mno-disable-fpregs
  223.           -mno-disable-indexing -mno-fast-indirect-calls -mno-gas
  224.           -mno-jump-in-delay -mno-millicode-long-calls
  225.           -mno-portable-runtime -mno-soft-float -msoft-float
  226.           -mpa-risc-1-0  -mpa-risc-1-1  -mportable-runtime -mschedule=LIST
  227.           
  228.           *Intel 960 Options*
  229.           -mCPU TYPE  -masm-compat  -mclean-linkage
  230.           -mcode-align  -mcomplex-addr  -mleaf-procedures
  231.           -mic-compat  -mic2.0-compat  -mic3.0-compat
  232.           -mintel-asm  -mno-clean-linkage  -mno-code-align
  233.           -mno-complex-addr  -mno-leaf-procedures
  234.           -mno-old-align  -mno-strict-align  -mno-tail-call
  235.           -mnumerics  -mold-align  -msoft-float  -mstrict-align
  236.           -mtail-call
  237.           
  238.           *DEC Alpha Options*
  239.           -mfp-regs  -mno-fp-regs  -mno-soft-float
  240.           -msoft-float
  241.           
  242.           *Clipper Options*
  243.           -mc300 -mc400
  244.           
  245.           *H8/300 Options*
  246.           -mrelax  -mh
  247.           
  248.           *System V Options*
  249.           -Qy  -Qn  -YP,PATHS  -Ym,DIR
  250.  
  251. *Code Generation Options*
  252.      *Note Options for Code Generation Conventions: Code Gen Options.
  253.           -fcall-saved-REG  -fcall-used-REG
  254.           -ffixed-REG  -finhibit-size-directive
  255.           -fno-common  -fno-ident  -fno-gnu-linker
  256.           -fpcc-struct-return  -fpic  -fPIC
  257.           -freg-struct-return  -fshared-data  -fshort-enums
  258.           -fshort-double  -fvolatile  -fvolatile-global
  259.           -fverbose-asm -fpack-struct +e0  +e1
  260.  
  261. * Menu:
  262.  
  263. * Overall Options::     Controlling the kind of output:
  264.                         an executable, object files, assembler files,
  265.                         or preprocessed source.
  266. * C Dialect Options::   Controlling the variant of C language compiled.
  267. * C++ Dialect Options:: Variations on C++.
  268. * Warning Options::     How picky should the compiler be?
  269. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  270. * Optimize Options::    How much optimization?
  271. * Preprocessor Options:: Controlling header files and macro definitions.
  272.                          Also, getting dependency information for Make.
  273. * Assembler Options::   Passing options to the assembler.
  274. * Link Options::        Specifying libraries and so on.
  275. * Directory Options::   Where to find header files and libraries.
  276.                         Where to find the compiler executable files.
  277. * Target Options::      Running a cross-compiler, or an old version of GNU CC.
  278.  
  279. 
  280. File: gcc.info,  Node: Overall Options,  Next: Invoking G++,  Prev: Option Summary,  Up: Invoking GCC
  281.  
  282. Options Controlling the Kind of Output
  283. ======================================
  284.  
  285.    Compilation can involve up to four stages: preprocessing, compilation
  286. proper, assembly and linking, always in that order.  The first three
  287. stages apply to an individual source file, and end by producing an
  288. object file; linking combines all the object files (those newly
  289. compiled, and those specified as input) into an executable file.
  290.  
  291.    For any given input file, the file name suffix determines what kind
  292. of compilation is done:
  293.  
  294. `FILE.c'
  295.      C source code which must be preprocessed.
  296.  
  297. `FILE.i'
  298.      C source code which should not be preprocessed.
  299.  
  300. `FILE.ii'
  301.      C++ source code which should not be preprocessed.
  302.  
  303. `FILE.m'
  304.      Objective-C source code.  Note that you must link with the library
  305.      `libobjc.a' to make an Objective-C program work.
  306.  
  307. `FILE.h'
  308.      C header file (not to be compiled or linked).
  309.  
  310. `FILE.cc'
  311. `FILE.cxx'
  312. `FILE.cpp'
  313. `FILE.C'
  314.      C++ source code which must be preprocessed.  Note that in `.cxx',
  315.      the last two letters must both be literally `x'.  Likewise, `.C'
  316.      refers to a literal capital C.
  317.  
  318. `FILE.s'
  319.      Assembler code.
  320.  
  321. `FILE.S'
  322.      Assembler code which must be preprocessed.
  323.  
  324. `OTHER'
  325.      An object file to be fed straight into linking.  Any file name
  326.      with no recognized suffix is treated this way.
  327.  
  328.    You can specify the input language explicitly with the `-x' option:
  329.  
  330. `-x LANGUAGE'
  331.      Specify explicitly the LANGUAGE for the following input files
  332.      (rather than letting the compiler choose a default based on the
  333.      file name suffix).  This option applies to all following input
  334.      files until the next `-x' option.  Possible values for LANGUAGE
  335.      are:
  336.           c  objective-c  c++
  337.           c-header  cpp-output  c++-cpp-output
  338.           assembler  assembler-with-cpp
  339.  
  340. `-x none'
  341.      Turn off any specification of a language, so that subsequent files
  342.      are handled according to their file name suffixes (as they are if
  343.      `-x' has not been used at all).
  344.  
  345.    If you only want some of the stages of compilation, you can use `-x'
  346. (or filename suffixes) to tell `gcc' where to start, and one of the
  347. options `-c', `-S', or `-E' to say where `gcc' is to stop.  Note that
  348. some combinations (for example, `-x cpp-output -E' instruct `gcc' to do
  349. nothing at all.
  350.  
  351. `-c'
  352.      Compile or assemble the source files, but do not link.  The linking
  353.      stage simply is not done.  The ultimate output is in the form of an
  354.      object file for each source file.
  355.  
  356.      By default, the object file name for a source file is made by
  357.      replacing the suffix `.c', `.i', `.s', etc., with `.o'.
  358.  
  359.      Unrecognized input files, not requiring compilation or assembly,
  360.      are ignored.
  361.  
  362. `-S'
  363.      Stop after the stage of compilation proper; do not assemble.  The
  364.      output is in the form of an assembler code file for each
  365.      non-assembler input file specified.
  366.  
  367.      By default, the assembler file name for a source file is made by
  368.      replacing the suffix `.c', `.i', etc., with `.s'.
  369.  
  370.      Input files that don't require compilation are ignored.
  371.  
  372. `-E'
  373.      Stop after the preprocessing stage; do not run the compiler
  374.      proper.  The output is in the form of preprocessed source code,
  375.      which is sent to the standard output.
  376.  
  377.      Input files which don't require preprocessing are ignored.
  378.  
  379. `-o FILE'
  380.      Place output in file FILE.  This applies regardless to whatever
  381.      sort of output is being produced, whether it be an executable file,
  382.      an object file, an assembler file or preprocessed C code.
  383.  
  384.      Since only one output file can be specified, it does not make
  385.      sense to use `-o' when compiling more than one input file, unless
  386.      you are producing an executable file as output.
  387.  
  388.      If `-o' is not specified, the default is to put an executable file
  389.      in `a.out', the object file for `SOURCE.SUFFIX' in `SOURCE.o', its
  390.      assembler file in `SOURCE.s', and all preprocessed C source on
  391.      standard output.
  392.  
  393. `-v'
  394.      Print (on standard error output) the commands executed to run the
  395.      stages of compilation.  Also print the version number of the
  396.      compiler driver program and of the preprocessor and the compiler
  397.      proper.
  398.  
  399. `-pipe'
  400.      Use pipes rather than temporary files for communication between the
  401.      various stages of compilation.  This fails to work on some systems
  402.      where the assembler is unable to read from a pipe; but the GNU
  403.      assembler has no trouble.
  404.  
  405. 
  406. File: gcc.info,  Node: Invoking G++,  Next: C Dialect Options,  Prev: Overall Options,  Up: Invoking GCC
  407.  
  408. Compiling C++ Programs
  409. ======================
  410.  
  411.    C++ source files conventionally use one of the suffixes `.C', `.cc',
  412. `cpp', or `.cxx'; preprocessed C++ files use the suffix `.ii'.  GNU CC
  413. recognizes files with these names and compiles them as C++ programs
  414. even if you call the compiler the same way as for compiling C programs
  415. (usually with the name `gcc').
  416.  
  417.    However, C++ programs often require class libraries as well as a
  418. compiler that understands the C++ language--and under some
  419. circumstances, you might want to compile programs from standard input,
  420. or otherwise without a suffix that flags them as C++ programs.  `g++'
  421. is a program that calls GNU CC with the default language set to C++,
  422. and automatically specifies linking against the GNU class library
  423. libg++.  (1) On many systems, the script `g++' is also installed with
  424. the name `c++'.
  425.  
  426.    When you compile C++ programs, you may specify many of the same
  427. command-line options that you use for compiling programs in any
  428. language; or command-line options meaningful for C and related
  429. languages; or options that are meaningful only for C++ programs.  *Note
  430. Options Controlling C Dialect: C Dialect Options, for explanations of
  431. options for languages related to C.  *Note Options Controlling C++
  432. Dialect: C++ Dialect Options, for explanations of options that are
  433. meaningful only for C++ programs.
  434.  
  435.    ---------- Footnotes ----------
  436.  
  437.    (1)  Prior to release 2 of the compiler, there was a separate `g++'
  438. compiler.  That version was based on GNU CC, but not integrated with
  439. it.  Versions of `g++' with a `1.XX' version number--for example, `g++'
  440. version 1.37 or 1.42--are much less reliable than the versions
  441. integrated with GCC 2.  Moreover, combining G++ `1.XX' with a version 2
  442. GCC will simply not work.
  443.  
  444. 
  445. File: gcc.info,  Node: C Dialect Options,  Next: C++ Dialect Options,  Prev: Invoking G++,  Up: Invoking GCC
  446.  
  447. Options Controlling C Dialect
  448. =============================
  449.  
  450.    The following options control the dialect of C (or languages derived
  451. from C, such as C++ and Objective C) that the compiler accepts:
  452.  
  453. `-ansi'
  454.      Support all ANSI standard C programs.
  455.  
  456.      This turns off certain features of GNU C that are incompatible
  457.      with ANSI C, such as the `asm', `inline' and `typeof' keywords, and
  458.      predefined macros such as `unix' and `vax' that identify the type
  459.      of system you are using.  It also enables the undesirable and
  460.      rarely used ANSI trigraph feature, and disallows `$' as part of
  461.      identifiers.
  462.  
  463.      The alternate keywords `__asm__', `__extension__', `__inline__'
  464.      and `__typeof__' continue to work despite `-ansi'.  You would not
  465.      want to use them in an ANSI C program, of course, but it is useful
  466.      to put them in header files that might be included in compilations
  467.      done with `-ansi'.  Alternate predefined macros such as `__unix__'
  468.      and `__vax__' are also available, with or without `-ansi'.
  469.  
  470.      The `-ansi' option does not cause non-ANSI programs to be rejected
  471.      gratuitously.  For that, `-pedantic' is required in addition to
  472.      `-ansi'.  *Note Warning Options::.
  473.  
  474.      The macro `__STRICT_ANSI__' is predefined when the `-ansi' option
  475.      is used.  Some header files may notice this macro and refrain from
  476.      declaring certain functions or defining certain macros that the
  477.      ANSI standard doesn't call for; this is to avoid interfering with
  478.      any programs that might use these names for other things.
  479.  
  480.      The functions `alloca', `abort', `exit', and `_exit' are not
  481.      builtin functions when `-ansi' is used.
  482.  
  483. `-fno-asm'
  484.      Do not recognize `asm', `inline' or `typeof' as a keyword, so that
  485.      code can use these words as identifiers.  You can use the keywords
  486.      `__asm__', `__inline__' and `__typeof__' instead.  `-ansi' implies
  487.      `-fno-asm'.
  488.  
  489.      In C++, this switch only affects the `typeof' keyword, since `asm'
  490.      and `inline' are standard keywords.  You may want to use the
  491.      `-fno-gnu-keywords' flag instead, as it also disables the other,
  492.      C++-specific, extension keywords such as `headof'.
  493.  
  494. `-fno-builtin'
  495.      Don't recognize builtin functions that do not begin with two
  496.      leading underscores.  Currently, the functions affected include
  497.      `abort', `abs', `alloca', `cos', `exit', `fabs', `ffs', `labs',
  498.      `memcmp', `memcpy', `sin', `sqrt', `strcmp', `strcpy', and
  499.      `strlen'.
  500.  
  501.      GCC normally generates special code to handle certain builtin
  502.      functions more efficiently; for instance, calls to `alloca' may
  503.      become single instructions that adjust the stack directly, and
  504.      calls to `memcpy' may become inline copy loops.  The resulting
  505.      code is often both smaller and faster, but since the function
  506.      calls no longer appear as such, you cannot set a breakpoint on
  507.      those calls, nor can you change the behavior of the functions by
  508.      linking with a different library.
  509.  
  510.      The `-ansi' option prevents `alloca' and `ffs' from being builtin
  511.      functions, since these functions do not have an ANSI standard
  512.      meaning.
  513.  
  514. `-trigraphs'
  515.      Support ANSI C trigraphs.  You don't want to know about this
  516.      brain-damage.  The `-ansi' option implies `-trigraphs'.
  517.  
  518. `-traditional'
  519.      Attempt to support some aspects of traditional C compilers.
  520.      Specifically:
  521.  
  522.         * All `extern' declarations take effect globally even if they
  523.           are written inside of a function definition.  This includes
  524.           implicit declarations of functions.
  525.  
  526.         * The newer keywords `typeof', `inline', `signed', `const' and
  527.           `volatile' are not recognized.  (You can still use the
  528.           alternative keywords such as `__typeof__', `__inline__', and
  529.           so on.)
  530.  
  531.         * Comparisons between pointers and integers are always allowed.
  532.  
  533.         * Integer types `unsigned short' and `unsigned char' promote to
  534.           `unsigned int'.
  535.  
  536.         * Out-of-range floating point literals are not an error.
  537.  
  538.         * Certain constructs which ANSI regards as a single invalid
  539.           preprocessing number, such as `0xe-0xd', are treated as
  540.           expressions instead.
  541.  
  542.         * String "constants" are not necessarily constant; they are
  543.           stored in writable space, and identical looking constants are
  544.           allocated separately.  (This is the same as the effect of
  545.           `-fwritable-strings'.)
  546.  
  547.         * All automatic variables not declared `register' are preserved
  548.           by `longjmp'.  Ordinarily, GNU C follows ANSI C: automatic
  549.           variables not declared `volatile' may be clobbered.
  550.  
  551.         * The character escape sequences `\x' and `\a' evaluate as the
  552.           literal characters `x' and `a' respectively.  Without
  553.           `-traditional', `\x' is a prefix for the hexadecimal
  554.           representation of a character, and `\a' produces a bell.
  555.  
  556.         * In C++ programs, assignment to `this' is permitted with
  557.           `-traditional'.  (The option `-fthis-is-variable' also has
  558.           this effect.)
  559.  
  560.      You may wish to use `-fno-builtin' as well as `-traditional' if
  561.      your program uses names that are normally GNU C builtin functions
  562.      for other purposes of its own.
  563.  
  564.      You cannot use `-traditional' if you include any header files that
  565.      rely on ANSI C features.  Some vendors are starting to ship
  566.      systems with ANSI C header files and you cannot use `-traditional'
  567.      on such systems to compile files that include any system headers.
  568.  
  569. `'
  570.      In the preprocessor, comments convert to nothing at all, rather
  571.      than to a space.  This allows traditional token concatenation.
  572.  
  573. `'
  574.      In preprocessing directive, the `#' symbol must appear as the first
  575.      character of a line.
  576.  
  577. `'
  578.      In the preprocessor, macro arguments are recognized within string
  579.      constants in a macro definition (and their values are stringified,
  580.      though without additional quote marks, when they appear in such a
  581.      context).  The preprocessor always considers a string constant to
  582.      end at a newline.
  583.  
  584. `'
  585.      The predefined macro `__STDC__' is not defined when you use
  586.      `-traditional', but `__GNUC__' is (since the GNU extensions which
  587.      `__GNUC__' indicates are not affected by `-traditional').  If you
  588.      need to write header files that work differently depending on
  589.      whether `-traditional' is in use, by testing both of these
  590.      predefined macros you can distinguish four situations: GNU C,
  591.      traditional GNU C, other ANSI C compilers, and other old C
  592.      compilers.  The predefined macro `__STDC_VERSION__' is also not
  593.      defined when you use `-traditional'.  *Note Standard Predefined
  594.      Macros: (cpp.info)Standard Predefined, for more discussion of
  595.      these and other predefined macros.
  596.  
  597. `'
  598.      The preprocessor considers a string constant to end at a newline
  599.      (unless the newline is escaped with `\').  (Without `-traditional',
  600.      string constants can contain the newline character as typed.)
  601.  
  602. `-traditional-cpp'
  603.      Attempt to support some aspects of traditional C preprocessors.
  604.      This includes the last five items in the table immediately above,
  605.      but none of the other effects of `-traditional'.
  606.  
  607. `-fcond-mismatch'
  608.      Allow conditional expressions with mismatched types in the second
  609.      and third arguments.  The value of such an expression is void.
  610.  
  611. `-funsigned-char'
  612.      Let the type `char' be unsigned, like `unsigned char'.
  613.  
  614.      Each kind of machine has a default for what `char' should be.  It
  615.      is either like `unsigned char' by default or like `signed char' by
  616.      default.
  617.  
  618.      Ideally, a portable program should always use `signed char' or
  619.      `unsigned char' when it depends on the signedness of an object.
  620.      But many programs have been written to use plain `char' and expect
  621.      it to be signed, or expect it to be unsigned, depending on the
  622.      machines they were written for.  This option, and its inverse, let
  623.      you make such a program work with the opposite default.
  624.  
  625.      The type `char' is always a distinct type from each of `signed
  626.      char' or `unsigned char', even though its behavior is always just
  627.      like one of those two.
  628.  
  629. `-fsigned-char'
  630.      Let the type `char' be signed, like `signed char'.
  631.  
  632.      Note that this is equivalent to `-fno-unsigned-char', which is the
  633.      negative form of `-funsigned-char'.  Likewise, the option
  634.      `-fno-signed-char' is equivalent to `-funsigned-char'.
  635.  
  636. `-fsigned-bitfields'
  637. `-funsigned-bitfields'
  638. `-fno-signed-bitfields'
  639. `-fno-unsigned-bitfields'
  640.      These options control whether a bitfield is signed or unsigned,
  641.      when the declaration does not use either `signed' or `unsigned'.
  642.      By default, such a bitfield is signed, because this is consistent:
  643.      the basic integer types such as `int' are signed types.
  644.  
  645.      However, when `-traditional' is used, bitfields are all unsigned
  646.      no matter what.
  647.  
  648. `-fwritable-strings'
  649.      Store string constants in the writable data segment and don't
  650.      uniquize them.  This is for compatibility with old programs which
  651.      assume they can write into string constants.  The option
  652.      `-traditional' also has this effect.
  653.  
  654.      Writing into string constants is a very bad idea; "constants"
  655.      should be constant.
  656.  
  657. `-fallow-single-precision'
  658.      Do not promote single precision math operations to double
  659.      precision, even when compiling with `-traditional'.
  660.  
  661.      Traditional K&R C promotes all floating point operations to double
  662.      precision, regardless of the sizes of the operands.   On the
  663.      architecture for which you are compiling, single precision may be
  664.      faster than double precision.   If you must use `-traditional',
  665.      but want to use single precision operations when the operands are
  666.      single precision, use this option.   This option has no effect
  667.      when compiling with ANSI or GNU C conventions (the default).
  668.  
  669. 
  670. File: gcc.info,  Node: C++ Dialect Options,  Next: Warning Options,  Prev: C Dialect Options,  Up: Invoking GCC
  671.  
  672. Options Controlling C++ Dialect
  673. ===============================
  674.  
  675.    This section describes the command-line options that are only
  676. meaningful for C++ programs; but you can also use most of the GNU
  677. compiler options regardless of what language your program is in.  For
  678. example, you might compile a file `firstClass.C' like this:
  679.  
  680.      g++ -g -felide-constructors -O -c firstClass.C
  681.  
  682. In this example, only `-felide-constructors' is an option meant only
  683. for C++ programs; you can use the other options with any language
  684. supported by GNU CC.
  685.  
  686.    Here is a list of options that are *only* for compiling C++ programs:
  687.  
  688. `-fno-access-control'
  689.      Turn off all access checking.  This switch is mainly useful for
  690.      working around bugs in the access control code.
  691.  
  692. `-fall-virtual'
  693.      Treat all possible member functions as virtual, implicitly.  All
  694.      member functions (except for constructor functions and `new' or
  695.      `delete' member operators) are treated as virtual functions of the
  696.      class where they appear.
  697.  
  698.      This does not mean that all calls to these member functions will
  699.      be made through the internal table of virtual functions.  Under
  700.      some circumstances, the compiler can determine that a call to a
  701.      given virtual function can be made directly; in these cases the
  702.      calls are direct in any case.
  703.  
  704. `-fcheck-new'
  705.      Check that the pointer returned by `operator new' is non-null
  706.      before attempting to modify the storage allocated.  The current
  707.      Working Paper requires that `operator new' never return a null
  708.      pointer, so this check is normally unnecessary.
  709.  
  710. `-fconserve-space'
  711.      Put uninitialized or runtime-initialized global variables into the
  712.      common segment, as C does.  This saves space in the executable at
  713.      the cost of not diagnosing duplicate definitions.  If you compile
  714.      with this flag and your program mysteriously crashes after
  715.      `main()' has completed, you may have an object that is being
  716.      destroyed twice because two definitions were merged.
  717.  
  718. `-fdollars-in-identifiers'
  719.      Accept `$' in identifiers.  You can also explicitly prohibit use of
  720.      `$' with the option `-fno-dollars-in-identifiers'.  (GNU C++
  721.      allows `$' by default on some target systems but not others.)
  722.      Traditional C allowed the character `$' to form part of
  723.      identifiers.  However, ANSI C and C++ forbid `$' in identifiers.
  724.  
  725. `-fenum-int-equiv'
  726.      Anachronistically permit implicit conversion of `int' to
  727.      enumeration types.  Current C++ allows conversion of `enum' to
  728.      `int', but not the other way around.
  729.  
  730. `-fexternal-templates'
  731.      Cause template instantiations to obey `#pragma interface' and
  732.      `implementation'; template instances are emitted or not according
  733.      to the location of the template definition.  *Note Template
  734.      Instantiation::, for more information.
  735.  
  736. `-falt-external-templates'
  737.      Similar to -fexternal-templates, but template instances are
  738.      emitted or not according to the place where they are first
  739.      instantiated.  *Note Template Instantiation::, for more
  740.      information.
  741.  
  742. `-fno-gnu-keywords'
  743.      Do not recognize `classof', `headof', `signature', `sigof' or
  744.      `typeof' as a keyword, so that code can use these words as
  745.      identifiers.  You can use the keywords `__classof__',
  746.      `__headof__', `__signature__', `__sigof__', and `__typeof__'
  747.      instead.  `-ansi' implies `-fno-gnu-keywords'.
  748.  
  749. `-fno-implicit-templates'
  750.      Never emit code for templates which are instantiated implicitly
  751.      (i.e. by use); only emit code for explicit instantiations.  *Note
  752.      Template Instantiation::, for more information.
  753.  
  754. `-fhandle-signatures'
  755.      Recognize the `signature' and `sigof' keywords for specifying
  756.      abstract types.  The default (`-fno-handle-signatures') is not to
  757.      recognize them.  *Note Type Abstraction using Signatures: C++
  758.      Signatures.
  759.  
  760. `-fhuge-objects'
  761.      Support virtual function calls for objects that exceed the size
  762.      representable by a `short int'.  Users should not use this flag by
  763.      default; if you need to use it, the compiler will tell you so.  If
  764.      you compile any of your code with this flag, you must compile
  765.      *all* of your code with this flag (including libg++, if you use
  766.      it).
  767.  
  768.      This flag is not useful when compiling with -fvtable-thunks.
  769.  
  770. `-fno-implement-inlines'
  771.      To save space, do not emit out-of-line copies of inline functions
  772.      controlled by `#pragma implementation'.  This will cause linker
  773.      errors if these functions are not inlined everywhere they are
  774.      called.
  775.  
  776. `-fmemoize-lookups'
  777. `-fsave-memoized'
  778.      Use heuristics to compile faster.  These heuristics are not
  779.      enabled by default, since they are only effective for certain
  780.      input files.  Other input files compile more slowly.
  781.  
  782.      The first time the compiler must build a call to a member function
  783.      (or reference to a data member), it must (1) determine whether the
  784.      class implements member functions of that name; (2) resolve which
  785.      member function to call (which involves figuring out what sorts of
  786.      type conversions need to be made); and (3) check the visibility of
  787.      the member function to the caller.  All of this adds up to slower
  788.      compilation.  Normally, the second time a call is made to that
  789.      member function (or reference to that data member), it must go
  790.      through the same lengthy process again.  This means that code like
  791.      this:
  792.  
  793.           cout << "This " << p << " has " << n << " legs.\n";
  794.  
  795.      makes six passes through all three steps.  By using a software
  796.      cache, a "hit" significantly reduces this cost.  Unfortunately,
  797.      using the cache introduces another layer of mechanisms which must
  798.      be implemented, and so incurs its own overhead.
  799.      `-fmemoize-lookups' enables the software cache.
  800.  
  801.      Because access privileges (visibility) to members and member
  802.      functions may differ from one function context to the next, G++
  803.      may need to flush the cache.  With the `-fmemoize-lookups' flag,
  804.      the cache is flushed after every function that is compiled.  The
  805.      `-fsave-memoized' flag enables the same software cache, but when
  806.      the compiler determines that the context of the last function
  807.      compiled would yield the same access privileges of the next
  808.      function to compile, it preserves the cache.  This is most helpful
  809.      when defining many member functions for the same class: with the
  810.      exception of member functions which are friends of other classes,
  811.      each member function has exactly the same access privileges as
  812.      every other, and the cache need not be flushed.
  813.  
  814.      The code that implements these flags has rotted; you should
  815.      probably avoid using them.
  816.  
  817. `-fstrict-prototype'
  818.      Within an `extern "C"' linkage specification, treat a function
  819.      declaration with no arguments, such as `int foo ();', as declaring
  820.      the function to take no arguments.  Normally, such a declaration
  821.      means that the function `foo' can take any combination of
  822.      arguments, as in C.  `-pedantic' implies `-fstrict-prototype'
  823.      unless overridden with `-fno-strict-prototype'.
  824.  
  825.      This flag no longer affects declarations with C++ linkage.
  826.  
  827. `-fno-nonnull-objects'
  828.      Don't assume that a reference is initialized to refer to a valid
  829.      object.  Although the current C++ Working Paper prohibits null
  830.      references, some old code may rely on them, and you can use
  831.      `-fno-nonnull-objects' to turn on checking.
  832.  
  833.      At the moment, the compiler only does this checking for
  834.      conversions to virtual base classes.
  835.  
  836. `-foperator-names'
  837.      Recognize the operator name keywords `and', `bitand', `bitor',
  838.      `compl', `not', `or' and `xor' as synonyms for the symbols they
  839.      refer to.  `-ansi' implies `-foperator-names'.
  840.  
  841. `-fthis-is-variable'
  842.      Permit assignment to `this'.  The incorporation of user-defined
  843.      free store management into C++ has made assignment to `this' an
  844.      anachronism.  Therefore, by default it is invalid to assign to
  845.      `this' within a class member function; that is, GNU C++ treats
  846.      `this' in a member function of class `X' as a non-lvalue of type
  847.      `X *'.  However, for backwards compatibility, you can make it
  848.      valid with `-fthis-is-variable'.
  849.  
  850. `-fvtable-thunks'
  851.      Use `thunks' to implement the virtual function dispatch table
  852.      (`vtable').  The traditional (cfront-style) approach to
  853.      implementing vtables was to store a pointer to the function and two
  854.      offsets for adjusting the `this' pointer at the call site.  Newer
  855.      implementations store a single pointer to a `thunk' function which
  856.      does any necessary adjustment and then calls the target function.
  857.  
  858.      This option also enables a heuristic for controlling emission of
  859.      vtables; if a class has any non-inline virtual functions, the
  860.      vtable will be emitted in the translation unit containing the
  861.      first one of those.
  862.  
  863. `-nostdinc++'
  864.      Do not search for header files in the standard directories
  865.      specific to C++, but do still search the other standard
  866.      directories.  (This option is used when building libg++.)
  867.  
  868. `-traditional'
  869.      For C++ programs (in addition to the effects that apply to both C
  870.      and C++), this has the same effect as `-fthis-is-variable'.  *Note
  871.      Options Controlling C Dialect: C Dialect Options.
  872.  
  873.    In addition, these optimization, warning, and code generation options
  874. have meanings only for C++ programs:
  875.  
  876. `-fno-default-inline'
  877.      Do not assume `inline' for functions defined inside a class scope.
  878.      *Note Options That Control Optimization: Optimize Options.
  879.  
  880. `-Wenum-clash'
  881. `-Woverloaded-virtual'
  882. `-Wtemplate-debugging'
  883.      Warnings that apply only to C++ programs.  *Note Options to
  884.      Request or Suppress Warnings: Warning Options.
  885.  
  886. `+eN'
  887.      Control how virtual function definitions are used, in a fashion
  888.      compatible with `cfront' 1.x.  *Note Options for Code Generation
  889.      Conventions: Code Gen Options.
  890.  
  891.